package function

import (
	"fmt"
	"github.com/asticode/go-astikit"
	"github.com/asticode/go-astilectron"
	"go_gui_basic_binding/frame/bind"
	"go_gui_basic_binding/frame/log"
	"go_gui_basic_binding/frame/windows"
)

func Message(key string) {
	fmt.Println("调用了Message")
	bind.JsFunc("test", "测试调用js方法", "tips")
}

func Test(key string) {
	log.Log("调用go方法成功")
	bind.JsFunc("test", "测试调用js方法")

	// 创建窗口
	_, _ = windows.Create("bb", "tips", &astilectron.WindowOptions{
		Height: astikit.IntPtr(300),
		Title:  astikit.StrPtr("子窗口"),
		Width:  astikit.IntPtr(300),
	}, true)
}
